<div class="page-header-top">
    <div class="container-fluid">
        <!-- LOGO开始 -->
        <div class="page-logo" style="padding-top: 8px;">
            <a href="#" onclick="gotoMenu('0','0','${request.getContextPath()}/user/loginSucc.do')"><img src="${request.getContextPath()}/Public/assets/admin/img/logo.png" alt="logo"></a>
        </div>
        <!--LOGO结束 -->

        <a href="javascript:;" class="menu-toggler"></a>

        <div class="top-menu">
            <ul class="nav navbar-nav pull-right" id="chats">
            	<!-- 用户登录信息开始 -->
                <li class="dropdown dropdown-user dropdown-dark">
                    <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                        <img alt="" class="img-circle" src="${request.getContextPath()+ Session['userInfo'].image}" onerror="this.src='${request.getContextPath()}/Public/images/user/defaultHead.jpg'; this.onerror=null;">
                        <span class="username username-hide-mobile" id="userName" style="color: rgba(51, 51, 51, 1);"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-default">
                        <li>
                            <a href="${request.getContextPath()}/user/loginOut.do">
                                <i class="icon-key"></i>退出登录</a>
                        </li>
                    </ul>
                </li>
                <#assign sumNotRead=0>
           	  	<#list Session['notReadList'] as notReadMsg>
           	  	 	<#assign sumNotRead=sumNotRead + notReadMsg.num>
           	  	</#list>
                <!--洽谈提示结束 -->
                 <li class="droddown dropdown-separator"> 
                     <span class="separator"></span> 
                 </li> 
                <li class="dropdown dropdown-extended dropdown-dark dropdown-notification" id="header_notification_bar">
                	<a href="${request.getContextPath()}/chats/index.do" class="dropdown-toggle"  data-hover="dropdown" data-close-others="true"> 
                       	  <img id="chatRemindImg" src="${request.getContextPath()}/Public/images/chats/msgRemind.png" style="width:20px;" />&nbsp;消息中心 
                     </a>
                     <ul class="dropdown-menu" style="width:200px;"> 
                         <li class="external"> 
                             <h3>你有 <strong id="strongMsgNum">${sumNotRead}</strong> 条洽谈请求</h3> 
                         </li>
                     </ul>
                </li>
            </ul>
        </div>
    </div>
</div>
<script>

	function appendCanNotChatMsg(){
		var html = '<div style="position:fixed; z-index: 999; right:0; bottom:60px;">'
			+'<h3 style="color:red;">当前页面无法聊天，'
			+'<a href="${request.getContextPath()}/user/loginSucc.do" style="color:red; font-size:1.2em; text-decoration: underline;">点我</a>跳转!&nbsp;&nbsp;</h3>'
			+'</div>';
		$("body").append(html);
	}
	if(typeof(BASE_URL) == "undefined") BASE_URL = '${request.getContextPath()}';
	var Chats;
	window.onload = function() {
		if(typeof window.parent.frames['websocketFrame'] == "undefined") {
			appendCanNotChatMsg();
		} else {
			Chats = window.parent.frames['websocketFrame'].Chats;
		}
	}
	
</script>